import { BaseEntity } from '../../base/entity/base';
import { Column, Entity, Index } from 'typeorm';

/**
 * 促销汇总表 (PromoMt)
 */
@Entity('goods_promo_mt')
export class GoodsPromoMtEntity extends BaseEntity {
  @Index({ unique: true })
  @Column({ comment: '单据ID (Oracle)', length: 50 })
  billNo: string;

  @Column({ comment: '单据编号 (Oracle)', length: 100, nullable: true })
  billCode: string;

  @Column({ comment: '企业ID (Oracle)', length: 50, nullable: true })
  entId: string;

  @Column({ type: 'date', comment: '日期 (Oracle)', nullable: true })
  dates: Date;

  @Column({ type: 'time', comment: '时间 (Oracle)', nullable: true })
  onTime: string;

  @Column({ comment: '促销名称 (Oracle)', length: 255, nullable: true })
  promName: string;

  @Column({ comment: '票据状态 (Oracle)', nullable: true, default: 0 })
  billState: number;

  @Column({ comment: '规则ID (Oracle)', length: 100, nullable: true })
  ruleId: string;

  @Column({ comment: '操作员ID (Oracle)', length: 100, nullable: true })
  caozy: string;

  @Column({ comment: '促销内容说明 (Oracle)', type: 'text', nullable: true })
  promCon: string;

  @Column({ comment: '备注 (Oracle)', type: 'text', nullable: true })
  remark: string;

  @Column({ comment: '促销类型 (Oracle)', length: 50, nullable: true, default: 'A' })
  promType: string;

  @Column({ type: 'datetime', comment: '开始时间 (Oracle)', nullable: true })
  startTime: Date;

  @Column({ type: 'datetime', comment: '结束时间 (Oracle)', nullable: true })
  endTime: Date;

  @Index()
  @Column({ comment: '状态 0-禁用 1-启用', default: 1 })
  status: number;
} 